Subroutine Format

A subroutine may be named any unique, valid name. The general format for calling a subroutine is as follows:

SubroutineName(arg1, arg2,....,argn)

Subroutine call

GetOpTime(3,7)

DoInitialization()

Please note

Subroutine format notes:

1. If no arguments are specified, open and closed parentheses are still required.

2. Statements in subroutines must be valid in the logic that called the subroutine. For example, if a subroutine is called from the operation logic, the subroutine may contain only those statements valid in the operation logic. Subroutines called from an ACTIVATE statement or from the Interact Menu at run-time can have any general logic statements, including WAIT.

3. A subroutine may be used in any logic field. In addition, a subroutine may be used in any expression field, provided that the RETURN statement is used to return a value to the expression field. Expression fields include the Qty Each column of the Arrivals edit table and the routing rule for processing.

4. If a subroutine does not return an expression with the RETURN statement, a value of zero will be returned for subroutines of type Real and Integer. No value will be returned for a subroutine of type None or Interactive.